package com.seqb.manage.picture.controller;

import com.seqb.annotation.Log;
import com.seqb.common.Query;
import com.seqb.common.controller.BaseController;
import com.seqb.manage.picture.service.PictureService;
import com.seqb.utils.PageUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;

/**
 * @author lilinshen
 * @title 请填写标题
 * @description 请填写相关描述
 * @date 2021/6/23
 */
@Controller
@RequestMapping("/manage/picture/picture")
public class PictureController extends BaseController {

    @Autowired
    private PictureService pictureService;

    @GetMapping()
    @Log("图片列表")
    String Video() {
        return "manage/picture/picture.list";
    }

    @ResponseBody
    @GetMapping("/list")
    @Log("图片列表")
    public PageUtils list(@RequestParam Map<String, Object> params) {
        //查询列表数据
        Query query = new Query(params);
        return pictureService.list(query);
    }

}
